home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_6_mouseUp for lines.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  984 b   |  27 lines

  1. on mouseDown
  2.   global ScrollVec, CompVec
  3.   set QueryFieldVec to ["alco", "non-alco", "other", "total", "when", "how"]
  4.   setAt(ScrollVec, 4, 1)
  5.   set n to the number of chars in the name of the member of sprite the clickOn
  6.   set CastPressed to char 7 to n of the name of the member of sprite the clickOn
  7.   set whichScroll to getPos(QueryFieldVec, CastPressed)
  8.   set ScrollPos to getAt(ScrollVec, whichScroll)
  9.   if the mouseLine > -1 then
  10.     set LinePressed to the mouseLine
  11.     set Choice to CastPressed & LinePressed + ScrollPos - 1
  12.     set x to getOne(CompVec, Choice)
  13.     if x = 0 then
  14.       add(CompVec, Choice)
  15.       unity(CastPressed & "Curr", Choice)
  16.       set the foreColor of line LinePressed of field ("query-" & CastPressed) to 35
  17.     else
  18.       deleteAt(CompVec, x)
  19.       dissension(CastPressed & "Curr", Choice)
  20.       set the foreColor of line LinePressed of field ("query-" & CastPressed) to 204
  21.     end if
  22.     divide()
  23.     HitListCheck()
  24.     showCurrent()
  25.   end if
  26. end
  27.